building up output